package com.example.Util;

import jakarta.servlet.http.HttpServletResponse;

import java.io.PrintWriter;

//向页面输出东西
public class ResponseUtil {

    public static void write(HttpServletResponse response, Object o) throws Exception {
        response.setContentType("text/html;charset=utf-8");
        PrintWriter out = response.getWriter();
        out.print(o);
        out.flush();
        out.close();
    }

}
